<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Tacopie: includes/tacopie/network/tcp_socket.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="tacopie_logo.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Tacopie
   &#160;<span id="projectnumber">3.0.0</span>
   </div>
   <div id="projectbrief">Tacopie is a TCP Client &amp; Server C++11 library.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_09e761304027c904456130627fd4dcf5.html">includes</a></li><li class="navelem"><a class="el" href="dir_9a013686e2522dd95763481288c1f90f.html">tacopie</a></li><li class="navelem"><a class="el" href="dir_1619eefbac1db14eaf18adaf83ce3ccc.html">network</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">tcp_socket.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// MIT License</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">// Copyright (c) 2016-2017 Simon Ninon &lt;simon.ninon@gmail.com&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">// Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">// of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">// in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">// copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">// furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">// The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">// copies or substantial portions of the Software.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">// THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">// SOFTWARE.</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;tacopie/utils/typedefs.hpp&gt;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacetacopie.html">tacopie</a> {</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="classtacopie_1_1tcp__socket.html">   38</a></span>&#160;<span class="keyword">class </span><a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a> {</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classtacopie_1_1tcp__socket.html#ad8376e85df96ab9523f5d079ed7172ab">   46</a></span>&#160;  <span class="keyword">enum class</span> <a class="code" href="classtacopie_1_1tcp__socket.html#ad8376e85df96ab9523f5d079ed7172ab">type</a> {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    CLIENT,</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    SERVER,</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    UNKNOWN</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  };</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html#a88ed1cadb0263591c4d31805e0a1a001">tcp_socket</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html#a4bd737a76a2a326be03d704f79a35282">~tcp_socket</a>(<span class="keywordtype">void</span>) = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html#a88ed1cadb0263591c4d31805e0a1a001">tcp_socket</a>(fd_t fd, <span class="keyword">const</span> std::string&amp; host, std::uint32_t port, <a class="code" href="classtacopie_1_1tcp__socket.html#ad8376e85df96ab9523f5d079ed7172ab">type</a> t);</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html#a88ed1cadb0263591c4d31805e0a1a001">tcp_socket</a>(<a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a>&amp;&amp;);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html#a88ed1cadb0263591c4d31805e0a1a001">tcp_socket</a>(<span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a>&amp; <a class="code" href="classtacopie_1_1tcp__socket.html#aae3234c92bd36d5a614e44472d42bbf4">operator=</a>(<span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a>&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classtacopie_1_1tcp__socket.html#a69fde61058ab72d88ce48f557d8216cf">operator==</a>(<span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a>&amp; rhs) <span class="keyword">const</span>;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classtacopie_1_1tcp__socket.html#a76f69612969374b5aa542378d37ee398">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a>&amp; rhs) <span class="keyword">const</span>;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  std::vector&lt;char&gt; <a class="code" href="classtacopie_1_1tcp__socket.html#a0d6d30258a902d12b3c2c62644756685">recv</a>(std::size_t size_to_read);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  std::size_t <a class="code" href="classtacopie_1_1tcp__socket.html#a36521a8f502adc665ad0fb1c53583d04">send</a>(<span class="keyword">const</span> std::vector&lt;char&gt;&amp; data, std::size_t size_to_write);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classtacopie_1_1tcp__socket.html#a6748c78312763dca6b8be05c4c8c3419">connect</a>(<span class="keyword">const</span> std::string&amp; host, std::uint32_t port, std::uint32_t timeout_msecs = 0);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classtacopie_1_1tcp__socket.html#a910a183d7c45483f1cdacd10a1896155">bind</a>(<span class="keyword">const</span> std::string&amp; host, std::uint32_t port);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classtacopie_1_1tcp__socket.html#af0957ded2a84fb06d940cba98df477fb">listen</a>(std::size_t max_connection_queue);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html">tcp_socket</a> <a class="code" href="classtacopie_1_1tcp__socket.html#af5113c9332f83643cdaaf15c3f137760">accept</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classtacopie_1_1tcp__socket.html#ad5a30b17b1dad9f0ff40305e246a9213">close</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;  <span class="keyword">const</span> std::string&amp; <a class="code" href="classtacopie_1_1tcp__socket.html#ad294565f9a0fa52639ecfbf133eecd59">get_host</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;  std::uint32_t <a class="code" href="classtacopie_1_1tcp__socket.html#a5276fdc687ac3c5089a05e3e2d9de4fb">get_port</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html#ad8376e85df96ab9523f5d079ed7172ab">type</a> <a class="code" href="classtacopie_1_1tcp__socket.html#a4f663be51b845520505bc20a88b411ee">get_type</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classtacopie_1_1tcp__socket.html#a89be86ab254eec3fc16eedfba8b16fb2">set_type</a>(<a class="code" href="classtacopie_1_1tcp__socket.html#ad8376e85df96ab9523f5d079ed7172ab">type</a> t);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  fd_t <a class="code" href="classtacopie_1_1tcp__socket.html#a4fd367a1802ed6ae7fa0e33fc07ed255">get_fd</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classtacopie_1_1tcp__socket.html#a6d9933c767572b03fbb4b5ced4bd1fc4">is_ipv6</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;  <span class="keywordtype">void</span> create_socket_if_necessary(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  <span class="keywordtype">void</span> check_or_set_type(<a class="code" href="classtacopie_1_1tcp__socket.html#ad8376e85df96ab9523f5d079ed7172ab">type</a> t);</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  fd_t m_fd;</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;  std::string m_host;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;  std::uint32_t m_port;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  <a class="code" href="classtacopie_1_1tcp__socket.html#ad8376e85df96ab9523f5d079ed7172ab">type</a> m_type;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;};</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;} <span class="comment">// namespace tacopie</span></div><div class="ttc" id="classtacopie_1_1tcp__socket_html_a4f663be51b845520505bc20a88b411ee"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a4f663be51b845520505bc20a88b411ee">tacopie::tcp_socket::get_type</a></div><div class="ttdeci">type get_type(void) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a6d9933c767572b03fbb4b5ced4bd1fc4"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a6d9933c767572b03fbb4b5ced4bd1fc4">tacopie::tcp_socket::is_ipv6</a></div><div class="ttdeci">bool is_ipv6(void) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a6748c78312763dca6b8be05c4c8c3419"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a6748c78312763dca6b8be05c4c8c3419">tacopie::tcp_socket::connect</a></div><div class="ttdeci">void connect(const std::string &amp;host, std::uint32_t port, std::uint32_t timeout_msecs=0)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a89be86ab254eec3fc16eedfba8b16fb2"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a89be86ab254eec3fc16eedfba8b16fb2">tacopie::tcp_socket::set_type</a></div><div class="ttdeci">void set_type(type t)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_af5113c9332f83643cdaaf15c3f137760"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#af5113c9332f83643cdaaf15c3f137760">tacopie::tcp_socket::accept</a></div><div class="ttdeci">tcp_socket accept(void)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html">tacopie::tcp_socket</a></div><div class="ttdef"><b>Definition:</b> tcp_socket.hpp:38</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a5276fdc687ac3c5089a05e3e2d9de4fb"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a5276fdc687ac3c5089a05e3e2d9de4fb">tacopie::tcp_socket::get_port</a></div><div class="ttdeci">std::uint32_t get_port(void) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a4bd737a76a2a326be03d704f79a35282"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a4bd737a76a2a326be03d704f79a35282">tacopie::tcp_socket::~tcp_socket</a></div><div class="ttdeci">~tcp_socket(void)=default</div><div class="ttdoc">dtor </div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_ad8376e85df96ab9523f5d079ed7172ab"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#ad8376e85df96ab9523f5d079ed7172ab">tacopie::tcp_socket::type</a></div><div class="ttdeci">type</div><div class="ttdef"><b>Definition:</b> tcp_socket.hpp:46</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_aae3234c92bd36d5a614e44472d42bbf4"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#aae3234c92bd36d5a614e44472d42bbf4">tacopie::tcp_socket::operator=</a></div><div class="ttdeci">tcp_socket &amp; operator=(const tcp_socket &amp;)=delete</div><div class="ttdoc">assignment operator </div></div>
<div class="ttc" id="namespacetacopie_html"><div class="ttname"><a href="namespacetacopie.html">tacopie</a></div><div class="ttdef"><b>Definition:</b> io_service.hpp:48</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a88ed1cadb0263591c4d31805e0a1a001"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a88ed1cadb0263591c4d31805e0a1a001">tacopie::tcp_socket::tcp_socket</a></div><div class="ttdeci">tcp_socket(void)</div><div class="ttdoc">ctor </div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a4fd367a1802ed6ae7fa0e33fc07ed255"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a4fd367a1802ed6ae7fa0e33fc07ed255">tacopie::tcp_socket::get_fd</a></div><div class="ttdeci">fd_t get_fd(void) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a69fde61058ab72d88ce48f557d8216cf"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a69fde61058ab72d88ce48f557d8216cf">tacopie::tcp_socket::operator==</a></div><div class="ttdeci">bool operator==(const tcp_socket &amp;rhs) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_ad5a30b17b1dad9f0ff40305e246a9213"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#ad5a30b17b1dad9f0ff40305e246a9213">tacopie::tcp_socket::close</a></div><div class="ttdeci">void close(void)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_af0957ded2a84fb06d940cba98df477fb"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#af0957ded2a84fb06d940cba98df477fb">tacopie::tcp_socket::listen</a></div><div class="ttdeci">void listen(std::size_t max_connection_queue)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_ad294565f9a0fa52639ecfbf133eecd59"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#ad294565f9a0fa52639ecfbf133eecd59">tacopie::tcp_socket::get_host</a></div><div class="ttdeci">const std::string &amp; get_host(void) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a36521a8f502adc665ad0fb1c53583d04"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a36521a8f502adc665ad0fb1c53583d04">tacopie::tcp_socket::send</a></div><div class="ttdeci">std::size_t send(const std::vector&lt; char &gt; &amp;data, std::size_t size_to_write)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a76f69612969374b5aa542378d37ee398"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a76f69612969374b5aa542378d37ee398">tacopie::tcp_socket::operator!=</a></div><div class="ttdeci">bool operator!=(const tcp_socket &amp;rhs) const</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a910a183d7c45483f1cdacd10a1896155"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a910a183d7c45483f1cdacd10a1896155">tacopie::tcp_socket::bind</a></div><div class="ttdeci">void bind(const std::string &amp;host, std::uint32_t port)</div></div>
<div class="ttc" id="classtacopie_1_1tcp__socket_html_a0d6d30258a902d12b3c2c62644756685"><div class="ttname"><a href="classtacopie_1_1tcp__socket.html#a0d6d30258a902d12b3c2c62644756685">tacopie::tcp_socket::recv</a></div><div class="ttdeci">std::vector&lt; char &gt; recv(std::size_t size_to_read)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
